<?php

namespace Database\Factories;

use App\Models\Express;
use App\Models\SystemAdmin;
use Illuminate\Database\Eloquent\Factories\Factory;

class ExpressFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Express::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'code' => $this->faker->randomElement([
                'YT',
                'SF',
                'JD',
            ]),
            'name' => $this->faker->randomElement([
                '圆通快递',
                '顺丰快递',
                '京东快递',
            ]),
            'account' => $this->faker->randomElement(SystemAdmin::pluck('account')),
            'password' => $this->faker->randomElement(SystemAdmin::pluck('password')),
            'net_name' => $this->faker->text(20),
            'sort' => $this->faker->randomNumber(3, true),
            'partner_id' => $this->faker->randomElement([0, 1]),
            'partner_key' => $this->faker->randomElement([0, 1]),
            'is_net' => $this->faker->randomElement([0, 1]),
            'is_show' => $this->faker->randomElement([0, 1]),
            'status' => $this->faker->randomElement([0, 1]),
            'created_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'updated_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
        ];
    }
}
